/*
 * Application\Inc\Library\gsensor.h
 *
 * P1 GSensor function
 *
 * Author: Chao-Chi Kuo <chaochi_kuo@systech.com.tw>
 * Copyright (c) 2010 SYSTEMS & TECHNOLOGY CORP. <http://www.systech.com.tw/>
 * All rights reserved.
 *
 * Modifications:
 * 2010/04/21 Chao-Chi Kuo	first implemetation
 *
 * $Id: gsensor.h 196 2010-08-05 01:54:48Z chaochi_kuo $
 */
#ifndef __GSENSOR_H_
#define __GSENSOR_H_

#ifdef  __cplusplus
extern "C" {
#endif		/* __cplusplus */


#include "config.h"

#define USE_LIS302DL6	1
#define USE_LSM303DLH   1

#define GS_INIT_OK		0
#define GS_INIT_ERR		1

/* define GSensor I/O Control */
#define GS_GET_XYZ		1


/* LIS302DL6 only */
#define GS_SET_FF_1		2
#define GS_SET_FF_2		3
#define GS_GET_EVENT	4
  
//fenris 20101202 for up angle tset
#define RESOLUATION_2BIT    0.153125
#define RESOLUATION_8BIT    0.6125


extern int GSensor_Init(void);
extern void GSensor_Sleep(void);
extern void GSensor_Wakeup(void);
extern void GSensor_ioctl(int ioctl, char *arg);
extern void GSensor_IRQ_Callback(void);

#ifdef __cplusplus
}
#endif	/* __cplusplus */
#endif	/* __GSENSOR_H_ */